import java.util.Scanner;

public class HomeWorkDemo07 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数字");
        int num = scanner.nextInt();//8
//        int sum = 0;
//        for (int i = 0; i < num + 1; i++) {
//            sum += i;
//        }
//        System.out.println(sum);

        int j = 1;// 注意不要定义成0
        for (int i = num; i >= 1; i--) {
            j *= i;// j = j*1
        }
        System.out.println(j);
    }


}
